<% if logged_in? && current_user.moderator %>
<% @count = 0 %>
<center>
<table width=100%>
<% for story in @stories %>
  <% for line in story.lines %>
    <% if line.inappropriate %>
      <% @count += 1 %>
      <tr>
      <% if @count % 2 == 0 %>
        <td class="lighter">
      <% else %>
        <td class="darker">
      <% end %>
      <%= line.line %></td></tr>
      <% @user = User.find(line.reporting_user) %>
      <tr><td class="old_lighter"><div align=right>from story <%= link_to story.title, story_url(story) %> | flagged by <%= link_to @user.login, user_path(@user) %> 
      | <%= link_to 'clear flag', :controller=>'stories', :action=>'remove_flag', :id=>"1", :line_id=>line.id %> | <%= link_to 'edit line', edit_story_line_url(story, line) %> | <%= link_to 'destroy line', story_line_url(story, line), :confirm => 'Are you sure?', :method => :delete %>
      </div></td></tr>
    <% end %>
  <% end %>
<% end %>
</table>
</center>
<% else %>
Sneaky, sneaky...you must have moderator access to be here!
<% end %>

<BR><%= link_to "<< Back to stories", stories_url %>